#ifndef DYN_ARR_H_
#define DYN_ARR_H_

// Structure for int arrays of dynamic size
typedef struct {
	int alloced; // For how many elements there's space allocated
	int pos; // Index for the next element to be put
	int *arr;
} darri;

/* Initiates and allocates space for INIT_ELEMS integers for a dynamic
 * array. This function MUST be called before filling arrays. */
void darri_init(darri *arr, int init_elems);

/* Puts X into ARR. */
void darri_put(darri *arr, int x);

#endif /* DYN_ARR_H_ */
